<?php 
$Content = QContext::instance();
$base_url = $Content->requestUDI();
$search = $base_url;
$search['action'] = 'search';
$delete = $base_url;
$delete['action'] = 'del';
$add = $base_url;
$add['action'] = 'add';
$import = $base_url;
$import['action'] = 'import';
$smsFlag = $base_url;
$smsFlag['action'] = 'smsflag';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="<?php echo $_BASE_DIR?>css_v1/style.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $_BASE_DIR?>css_v1/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo $_BASE_DIR?>js_v1/jquery.js"></script>
<script type="text/javascript" src="<?php echo $_BASE_DIR?>js_v1/jmw.js"></script>
<script type="text/javascript" src="<?php echo $_BASE_DIR?>js_v1/select-ui.min.js"></script>
<script type="text/javascript" src="<?php echo $_BASE_DIR?>js_v1/jquery.DatePicker.js"></script>
<script type="text/javascript">
$(document).ready(function(e) {
    $(".select1").uedSelect({
		width : 345			  
	});
	$(".select2").uedSelect({
		width : 167  
	});
	$(".select3").uedSelect({
		width : 110
	});
});
</script>
</head>


<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="<?php echo url("leftmenu/bottom")?>">首页</a></li>
    <li><a href="<?php echo url("agent")?>">代理管理</a></li>
    </ul>
    </div>
    
    <div class="rightinfo">
	
	
<!--------------------------------------->

	
<div class="tools">
 <ul class="toolbar">
    <li ><a href="<?php echo url($add)?>"><span><img src="<?php echo $_BASE_DIR?>images_v1/t01.png" /></span>添加</a></li>
    <li ><a href="#" onclick="editindex('agentid','<?php echo url($add)?>/id/')"><span><img src="<?php echo $_BASE_DIR?>images_v1/t02.png" /></span>修改</a></li>
    <li class="click"><a href="#" onclick="isDel('agentid','<?php echo url('agent/del')?>','ids[]')"><span><img src="<?php echo $_BASE_DIR?>images_v1/t03.png" /></span>删除</a></li>
    

	</ul>
        
        
        
		
<!---------------------------------------------------------------------------- -->    
<form method="post" action="<?php echo url("agent/index") ?>">

	<div class="toolgmm">
    <ul class="seachform">
    <input type="hidden" name="agent_id" value="<?php echo isset($param['agent_id'])?$param['agent_id']:$Content->get('agent_id')?>">
			<li>
				<label>商家名称：</label>
				<input type="text" class="scinputjmw" name="acctname" value="<?php echo isset($param['acctname'])?$param['acctname']:'';?>"/>
				<input type="hidden" name="_querymethod[acctname]" value="like">
			</li>
			<li>
				<label>状态：</label>
			<div class="vocation">
			<select class="select3" name="enable">
				<option value="1" <?php echo isset($param['enable'])?$param['enable']=='1'?'selected':'':'';?>>正常</option>
				<option value="0" <?php echo isset($param['enable'])?$param['enable']=='0'?'selected':'':'';?>>锁定</option>
			</select>
			</div>
			</li>
		<li><label>&nbsp;</label><input type="submit" class="scbtn" value="查询" style="width:60px;"/></li>
	</ul>
	</div>
	</form>
<!---------------------------------------------------------------------------- --> 	
	
    </div>
	<!---------------------------------------------------- --> 	

    
	

	<form action="" method="post" name="form">
    <table class="tablelist">

    	<thead>
    	<tr>
     	  <th width="4%"><input type="checkbox" name="chkall" onClick="CheckAll(this.form)"></th>
     	  		<th width="8%" orderField="id" >ID</th>
				<th width="15%" orderField="acctname" >商家名称</th>
				<th width="15%"  >小程序名称</th>
				<!--  <th width="15%" >密码</th>-->
				<th width="15%" orderField="enable">代理ID/APPID</th>
				
				<th width="10%" >小程序APPSECRET</th>
				<th width="3%" orderField="enable">状态</th>
				
        </tr>
        </thead>
        <tbody>
       <?php foreach ($item as $k=>$v):?>
			<tr target="id" rel="<?php echo $v->id?>">
				<td><input name="agentid" id="agentid" value="<?php echo $v->id?>" type="checkbox"></td>
				<td><?php echo $v->id;?></td>
				<td><?php echo h($v->acctname)?></td>
				<td><?php echo h($v->name)?></td>
				<td><?php echo h($v->app_id)?></td>
				<td><?php echo $v->is_delete == 0 ?'正常':'<font color=red>冻结</font>';?></td>
				<td><?php echo $v->app_secret;?></td>

			</tr>
			<?php endforeach;?>
        </tbody>
    </table>
     </form>
    
    <?php echo Q::control('pagination','pagination',array('url_args'=>$param,'pagination'=>$pagination,'show_count'=>1))?>
    
       
    
    </div>
    
    <script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
	</script>

</body>

</html>


